﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        // 需求：打印一行5个小星星。
        // 字符串拼接的方式
        let start = '*';
        for (var i = 0; i < 5; i++) {
            start = start + "*";
        }
        console.log(start);
        // 打印 4 行， 每行 5 个小星星
        for (let i = 0; i < 4; i++) {
            let start = '';
            for (let j = 0; j < 5; j++) {
                start = start + "*";
            }
            console.log(start);
        }


    </script>
</body>
</html>